home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qwidgetstack.h.z / qwidgetstack.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  1.7 KB  |  79 lines

  1. /****************************************************************************
  2. ** $Id: qwidgetstack.h,v 2.7 1998/07/03 00:09:55 hanord Exp $
  3. **
  4. ** Definition of QWidgetStack class
  5. **
  6. ** Created : 980306
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QWIDGETSTACK_H
  25. #define QWIDGETSTACK_H
  26.  
  27. #ifndef QT_H
  28. #include "qframe.h"
  29. #include "qintdict.h"
  30. #endif // QT_H
  31.  
  32.  
  33. class QWidgetStackPrivate;
  34.  
  35. class QGridLayout;
  36.  
  37.  
  38. class QWidgetStack: public QFrame
  39. {
  40.     Q_OBJECT
  41. public:
  42.     QWidgetStack( QWidget * parent = 0, const char * name = 0 );
  43.     ~QWidgetStack();
  44.  
  45.     void addWidget( QWidget *, int );
  46.  
  47.     void removeWidget( QWidget * );
  48.  
  49.     void show();
  50.  
  51.     QWidget * widget( int ) const;
  52.     int id( QWidget * ) const;
  53.  
  54.     QWidget * visibleWidget() const;
  55.  
  56. signals:
  57.     void aboutToShow( int );
  58.     void aboutToShow( QWidget * );
  59.  
  60. public slots:
  61.     void raiseWidget( int );
  62.     void raiseWidget( QWidget * );
  63.  
  64. protected:
  65.     void frameChanged();
  66.  
  67.     void setChildGeometries();
  68.  
  69. private:
  70.     bool isMyChild( QWidget * );
  71.     QWidgetStackPrivate * d;
  72.     QIntDict<QWidget> * dict;
  73.     QGridLayout * l;
  74.     QWidget * topWidget;
  75. };
  76.  
  77.  
  78. #endif
  79.